
<div class="row">
  <div class="col-sm-12">
   <div class="widget">
        <div class="widget-title">
             <h3>订单管理</h3>
             <span> </span>
        </div>
        <div class="task-graph panel-body">
          {if condition="$user.withdraw eq '1'"}
          <form id="withdraw-form" role="form" data-toggle="validator" method="POST" action="/index/user/withdrawadd">
                  {:token()}
                  <div class="">
                      <div class="row">
                          <div class="col-sm-12">
                              <div class="form-group">
                                  <label class="control-label">我的余额：</label>
                                   <input type="text" class="form-control" value="可提现：{$money} 元 - 不可提现：{$today} 元 " disabled="disabled">
                              </div>
                          </div>
                      </div>
                      <div class="row">
                          <div class="col-sm-6">
                              <div class="form-group">
                                  <label class="control-label">提现金额：</label>
                                  <input type="text" id="money" name="money" data-rule="required" class="form-control" oninput="change()" onporpertychange="change()">
                              </div>
                          </div>
                          <div class="col-sm-6">
                              <div class="form-group">
                                  <label class="control-label">实际到账：</label>
                                  <input type="text" id="realmoney" class="form-control" value="" disabled="disabled">
                              </div>
                          </div>
                      </div>
                  </div>
                  <div class="text-right">
                    <button class="btn btn-success btn-block" type="submit">确认提现</button>
                  </div>
                  <br>
              </form>
              <hr style="margin-top: 0px;">
          {/if}
              <div class="table-responsive">
                <table class="table table-bordered">
                    <thead>
                       <tr>
                        <th>提现金额</th>
                        <th>手续费</th>
                        <th>状态</th>
                        <th>收款账号</th>
                        <th>时间</th>
                       </tr>
                    </thead>
                    <tbody>
                    {volist name="list" id="vo" empty="<td colspan='10' class='text-center'>暂无提现记录.</td>"}
                      <tr>
                        <td>{$vo.money}</td>
                        <td>{$vo.percent}</td>
                        <td>
                        {if condition="$vo.status eq 1"}
                        <span class="label label-success"> 成功</span>
                        {elseif condition="$vo.status eq 2"}
                        <span class="label label-danger label-faild" data-id="{$vo.id}" title="点击查看原因"> 失败</span>
                        {else /}
                        <span class="label label-warning"> 等待</span>
                        {/if}
                        </td>
                        <td>{$vo.withdraw_account}</td>
                        <td>{:date('Y-m-d H:i:s',$vo.createtime)}</td>
                    </tr>
                    {/volist}
                    </tbody>
                </table>
            </div>
            {$list->render()}
      </div>
  </div>
</div>
</div>
<script type="text/javascript">
function change(){
var money = $("#money").val();
var realmoney = parseFloat(money) - parseFloat('{$site.withdraw_money2}');
if (realmoney<0) var realmoney = 0;
$("#realmoney").val(realmoney);
}
</script>